<template>
  <div class="app-container">
    <div class="filter-container">
      <el-page-header @back="backUp" class="backUp" content="导入记录"></el-page-header>
    </div>
    <el-table
      :data="data"
      center
      style="width: 100%;margin-bottom: 20px;"
      row-key="id"
      border
    >
      <el-table-column prop="id" label="序号" align='center'/>
      <el-table-column prop="create_time" label="导入时间"  align='center'/>
      <el-table-column label="导入数量" prop="count" align='center'/>
      <el-table-column label="成功数量" prop="success_count" align='center'/>
      <el-table-column label="失败数量" prop="fail_count" align='center'/>
      <el-table-column label="操作" width='200' align='center'>
        <template slot-scope="item">
          <el-link type="primary" class="table_btn" @click="handleDetails(item.row.id)" :underline="false"><i class="iconfont icon-chakanxiangqing"></i>查看</el-link>
        </template>
      </el-table-column>
    </el-table>
    <el-pagination
      background
      class="pagination-container"
      @size-change="handleSizeChange"
      @current-change="handleCurrentChange"
      :current-page="paginate.current"
      hide-on-single-page
      :page-sizes="paginate.sizes"
      :page-size="paginate.limit"
      :layout="paginate.layout"
      :total="paginate.total"/>
  </div>
</template>

<script>
import formOperate from '@/layout/mixin/formOperate'
export default {
  name: 'Index',
  mixins: [formOperate],
  data() {
    return {
      url:'/profession/admin/Import',
      queryParam:{
        type:'',
        page_index:1,
        page_size:10,
        import_id:'',
        request_type:'1'
      }
    }
  },
  mounted() {
   this.queryParam.type = this.$route.query.type
  },
  methods: {
    // 查看详情
    handleDetails(id) {
      this.$router.push({path:'/vip/importRecordDetails',query:{id:id,type:this.queryParam.type}})
    },
    backUp() {
      this.$router.go(-1)
    }
  }
}
</script>
<style scoped>
  .el-page-header__content{
    font-size: 18px;
    color:#222222;
    font-weight: bold;
  }
</style>